
// stdafx.h : include file for standard system include files,
// or project specific include files that are used frequently,
// but are changed infrequently

#pragma once

#ifndef _SECURE_ATL
#define _SECURE_ATL 1
#endif

#ifndef VC_EXTRALEAN
#define VC_EXTRALEAN            // Exclude rarely-used stuff from Windows headers
#endif

#include "targetver.h"

#define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS      // some CString constructors will be explicit

// turns off MFC's hiding of some common and often safely ignored warning messages
#define _AFX_ALL_WARNINGS

#include <afxwin.h>         // MFC core and standard components
#include <afxext.h>         // MFC extensions





#ifndef _AFX_NO_OLE_SUPPORT
#include <afxdtctl.h>           // MFC support for Internet Explorer 4 Common Controls
#endif
#ifndef _AFX_NO_AFXCMN_SUPPORT
#include <afxcmn.h>             // MFC support for Windows Common Controls
#endif // _AFX_NO_AFXCMN_SUPPORT

#include <afxcontrolbars.h>     // MFC support for ribbons and control bars

//{{AFX_INSERT_LOCATION}}

#define MAX_LAYER_NUMBER		0xff

#define CHAT_APP_HEADER_SIZE	( sizeof(unsigned short) + sizeof(unsigned char) + sizeof(unsigned char) )
#define CHAT_APP_DATA_SIZE		( ETHER_DATA_SIZE - ( CHAT_APP_HEADER_SIZE + TCP_HEADER_SIZE + IP_HEADER_SIZE ) )

#define TCP_HEADER_SIZE			20
#define TCP_DATA_SIZE			( ETHER_DATA_SIZE - ( TCP_HEADER_SIZE + IP_HEADER_SIZE ) )

#define IP_HEADER_SIZE			20
#define IP_DATA_SIZE			( ETHER_DATA_SIZE - ( IP_HEADER_SIZE ) )

#define ETHER_MAX_SIZE			1514
#define ETHER_HEADER_SIZE		14
#define	ETHER_DATA_SIZE			( ETHER_MAX_SIZE - ETHER_HEADER_SIZE )

#define	CHAT_PORT				0x0820
#define FILE_PORT				0x0830

#define	IP_PROTOCOL				0x0800
#define	ARP_PROTOCOL			0x0806
#define	RARP_PROTOCOL			0x0835

#define DATA_TYPE_START			0x00
#define DATA_TYPE_CONT			0x01
#define DATA_TYPE_END			0x02

#define DATA_MSG_TYPE_DATA		0x00	
#define DATA_MSG_TYPE_ACK		0x01
#define DATA_MSG_TYPE_NAK		0x02

#define ARP_IMCOMPLETE			0
#define ARP_COMPLETE			1

#define ARP_REQUEST				0x0001
#define ARP_REPLY				0x0002

#define ARP_MESSAGE_SIZE		28

#ifdef _UNICODE
#if defined _M_IX86
#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='x86' publicKeyToken='6595b64144ccf1df' language='*'\"")
#elif defined _M_X64
#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='amd64' publicKeyToken='6595b64144ccf1df' language='*'\"")
#else
#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"")
#endif
#endif


